//
//  LocalPathDataSource.m
//  tcpoctest
//
//  Created by gump on 4/19/13.
//  Copyright (c) 2013 gump. All rights reserved.
//

#import "LocalPathDataSource.h"

@implementation LocalPathDataSource

-(id)init
{
    self = [super init];
    if (self != nil) {
        self.FircirPath = @"";
        self.imagePath = @"";
        self.soundPath = @"";
        self.headimagePath = @"";
        self.chatPath = @"";
        self.giftPath = @"";
        
        pthread_mutex_init(&mpathmutex, 0);
    }
    
    return self;
}

-(void)setLPFircirPath:(NSString *)strpath
{
    pthread_mutex_lock(&mpathmutex);
    
    self.FircirPath = strpath;
    
    pthread_mutex_unlock(&mpathmutex);
}

-(NSString *)LPFircirPath
{
    NSString *str = @"";
    
    pthread_mutex_lock(&mpathmutex);
    
    str = self.FircirPath;
    
    pthread_mutex_unlock(&mpathmutex);
    
    return str;
}

-(void)setLPImagePath:(NSString *)strpath
{
    pthread_mutex_lock(&mpathmutex);
    
    self.imagePath = strpath;
    
    pthread_mutex_unlock(&mpathmutex);
}

-(NSString *)LPImagePath
{
    NSString *str = @"";
    
    pthread_mutex_lock(&mpathmutex);
    
    str = self.imagePath;
    
    pthread_mutex_unlock(&mpathmutex);
    
    return str;
}

-(void)setLPSoundPath:(NSString *)strpath
{
    pthread_mutex_lock(&mpathmutex);
    
    self.soundPath = strpath;
    
    pthread_mutex_unlock(&mpathmutex);
}

-(NSString *)LPSoundPath
{
    NSString *str = @"";
    
    pthread_mutex_lock(&mpathmutex);
    
    str = self.imagePath;
    
    pthread_mutex_unlock(&mpathmutex);
    
    return str;
}

-(void)setLPFHeadImagePath:(NSString *)strpath
{
    pthread_mutex_lock(&mpathmutex);
    
    self.headimagePath = strpath;
    
    pthread_mutex_unlock(&mpathmutex);
}

-(NSString *)LPHeadImagePath
{
    NSString *str = @"";
    
    pthread_mutex_lock(&mpathmutex);
    
    str = self.headimagePath;
    
    pthread_mutex_unlock(&mpathmutex);
    
    return str;
}

-(void)setLPChatPath:(NSString *)strpath
{
    pthread_mutex_lock(&mpathmutex);
    
    self.chatPath = strpath;
    
    pthread_mutex_unlock(&mpathmutex);
}

-(NSString *)LPChatPath
{
    NSString *str = @"";
    
    pthread_mutex_lock(&mpathmutex);
    
    str = self.chatPath;
    
    pthread_mutex_unlock(&mpathmutex);
    
    return str;
}

-(void)setLPGiftPath:(NSString *)strpath
{
    pthread_mutex_lock(&mpathmutex);
    
    self.giftPath = strpath;
    
    pthread_mutex_unlock(&mpathmutex);
}

-(NSString *)LPGiftPath
{
    NSString *str = @"";
    
    pthread_mutex_lock(&mpathmutex);
    
    str = self.giftPath;
    
    pthread_mutex_unlock(&mpathmutex);
    
    return str;
}

@end
